package com.codeoss.module.res.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.codeoss.module.res.request.RelRoleMMenuPageRequest;
import com.codeoss.module.res.response.RelRoleMMenuPageResponse;
import com.codeoss.module.res.service.IRelRoleMMenuPageService;

@Controller
@RequestMapping("relrolemmenupage")
public class RelRoleMMenuPageController {
	@Autowired
	private IRelRoleMMenuPageService relRoleMMenuPageService;
	@RequestMapping(value = "init", method = RequestMethod.GET)
	@ResponseBody
	public RelRoleMMenuPageResponse init(@RequestParam("resRoleId") Long resRoleId){
		RelRoleMMenuPageResponse relRoleMMenuPageResponse=relRoleMMenuPageService.init(resRoleId);
		return relRoleMMenuPageResponse;
	}
	
	@RequestMapping(value = "dataSave", method = RequestMethod.POST)
	@ResponseBody
	public RelRoleMMenuPageResponse dataSave(@RequestBody RelRoleMMenuPageRequest request){
		RelRoleMMenuPageResponse relRoleMMenuPageResponse=relRoleMMenuPageService.dataSave(request);
		return relRoleMMenuPageResponse;
	}
}
